/* ====================================== toast  ====================================== */
import React from 'react'
import { Pagination } from 'antd'
// ===================================================================== Select
const _ = ({ pag, onChange, style, suffix, children, size, hasPag, total, hasTotal })=>(
	<div className='fxj antd-pag bcf' style={{padding:'8px 10px', ...style}}>
		{
			children ? children : (
				<div className='g6 fxc'>
					{
						hasTotal && <div className='fxm f12 g9 nowrap'>共 {pag.total || total} 条数据</div>
					}
					{
						suffix && <div className='ml10 fxm'>{window.$fn.isFunction(suffix) ? suffix() : suffix} </div>
					}
				</div>
			)
		}
		{
			
			<Pagination
				size				= { size ? size :'small' }
				current				= { pag.current } 
				total				= { pag.total }
				pageSize			= { pag.pageSize }
				onChange			= { (current, pageSize) =>{ onChange && onChange(current, pageSize) } }
				showQuickJumper		= { false }
				showSizeChanger 	= { true }
				hideOnSinglePage	= { !hasPag }
				pageSizeOptions		= {[ 10, 20, 50, 100, 150, 200, 300, 500, 600, 1000, 2000, 5000]}
			/>
		}
		
	</div>
)
export default _